package work.huangxin.share.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import work.huangxin.share.domain.business.BusinessInfo;
import work.huangxin.share.mapper.BusinessMapper;
import work.huangxin.share.service.BusinessService;

import java.util.List;
import java.util.Set;

/**
 * @author 季台星
 * @Date 2023 04 22 15 12
 */
@Service
public class BusinessServiceImpl implements BusinessService {
    @Autowired
    private BusinessMapper  businessMapper;
    @Override
    public List<Integer> getTotalBusinessNum() {
        return businessMapper.selectTotalId();
    }

    @Override
    public List<BusinessInfo> selectBusinessList(Set<Integer> randomBusinessIdSet) {
        return businessMapper.selectBusinessList(randomBusinessIdSet);
    }

    @Override
    public int insertBusinessInfo(BusinessInfo businessInfo) {
        return businessMapper.insertSelective(businessInfo);
    }

    @Override
    public BusinessInfo getBusinessById(Integer id) {
        return businessMapper.selectBusinessById(id);
    }

    @Override
    public BusinessInfo selectBusinessById(Integer businessId) {
        return businessMapper.selectBusinessById(businessId);
    }
}
